module FullAdder(
  input logic a,
  input logic b,
  input logic cin,
  output logic sum,
  output logic cout
);
  assign sum = a ^ b ^ cin;
  assign cout = (a & b) | (cin & (a ^ b));
endmodule

module FullAdderSimulation;
  logic a, b, cin, sum, cout;
  
  FullAdder dut (
    .a(a),
    .b(b),
    .cin(cin),
    .sum(sum),
    .cout(cout)
  );
  
  initial begin
    $dumpfile("full_adder.vcd");
    $dumpvars(0, FullAdderSimulation);
    
    // Test case 1: a=0, b=0, cin=0
    a = 0; b = 0; cin = 0;
    #10;
    
    // Test case 2: a=1, b=0, cin=1
    a = 1; b = 0; cin = 1;
    #10;
    
    // Test case 3: a=1, b=1, cin=0
    a = 1; b = 1; cin = 0;
    #10;
    
    // Test case 4: a=1, b=1, cin=1
    a = 1; b = 1; cin = 1;
    #10;
    
    $finish;
  end
endmodule